package com.study.spmongodb.wwj.thread3.char01;

/**
 * @author study
 * @version 1.0
 * @date 2020/12/10 15:56
 */
public class LoaderClass {

    public static void main(String[] args) {

        final MyOjbect myOjbect = new MyOjbect();
        final MyOjbect myOjbect2 = new MyOjbect();

        final MyOjbect myOjbect3 = new MyOjbect();
        final MyOjbect myOjbect4 = new MyOjbect();

        System.out.println(myOjbect3.getClass() == myOjbect4.getClass());
        System.out.println(myOjbect.getClass() == myOjbect2.getClass());

        System.out.println(Sub.x);
    }
}

/**
 *
 */
class Parent {
    static {
        System.out.println("parent");
    }
}

class Sub extends Parent {

    public static int x = 100;

    static {
        System.out.println("sub");
    }
}

class MyOjbect {
    static {
        System.out.println("static MyOjbect");
    }

    {
        System.out.println("MyObject");
    }
}
